Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kafka Experiment to support version 3.x and newer #485

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tommynguyen-vungle
Copy link

@tommynguyen-vungle tommynguyen-vungle commented Feb 18, 2022

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

In conjuction with litmuschaos/test-tools#210

Checklist:

  • Fixes #
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

Signed-off-by: tuannvm <[email protected]>
@tommynguyen-vungle tommynguyen-vungle changed the title Use bootstrap server Update Kafka Experiment to support version 3.x and newer Feb 20, 2022
@tommynguyen-vungle tommynguyen-vungle marked this pull request as ready for review February 20, 2022 09:45
@ajeshbaby ajeshbaby requested a review from avaakash March 10, 2022 10:47
@@ -40,7 +40,7 @@ func LivenessStream(experimentsDetails *experimentTypes.ExperimentDetails, clien
if experimentsDetails.KafkaInstanceName == "" {

execCommandDetails := litmusexec.PodDetails{}
command := append([]string{"/bin/sh", "-c"}, "kafka-topics --topic topic-"+experimentsDetails.RunID+" --describe --zookeeper "+experimentsDetails.ZookeeperService+":"+experimentsDetails.ZookeeperPort+" | grep -o 'Leader: [^[:space:]]*' | awk '{print $2}'")
command := append([]string{"/bin/sh", "-c"}, "kafka-topics --topic topic-"+experimentsDetails.RunID+" --describe --boostrap-server "+experimentsDetails.KafkaService+":"+experimentsDetails.KafkaPort+" | grep -o 'Leader: [^[:space:]]*' | awk '{print $2}'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command := append([]string{"/bin/sh", "-c"}, "kafka-topics --topic topic-"+experimentsDetails.RunID+" --describe --boostrap-server "+experimentsDetails.KafkaService+":"+experimentsDetails.KafkaPort+" | grep -o 'Leader: [^[:space:]]*' | awk '{print $2}'")
command := append([]string{"/bin/sh", "-c"}, "kafka-topics --topic topic-"+experimentsDetails.RunID+" --describe --bootstrap-server "+experimentsDetails.KafkaService+":"+experimentsDetails.KafkaPort+" | grep -o 'Leader: [^[:space:]]*' | awk '{print $2}'")

@uditgaurav
Copy link
Member

uditgaurav commented Apr 26, 2022

Thanks, @tommynguyen-vungle for the PR, can you also attach the logs with Kafka 3.X version. Can we also have backward compatibility?

@neelanjan00 neelanjan00 added the enhancement New feature or request label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants